package com.nefu.huiyi.mapper;

import com.nefu.huiyi.entity.TitleStatistics;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;

@Mapper
public interface DoctorTitleMapper {

    /**
     * 按职称统计医生数量
     * @return 职称统计列表
     */
    @Select("SELECT title, COUNT(*) as count FROM doctor GROUP BY title")
    List<TitleStatistics> countDoctorsByTitle();
}